﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace W.Purchase.Repository
{
    public interface IRepository<T> where T : class
    {
        EFCoreDbContext DB { get; }
        Task<int> AddAsync(T entity);
        Task<int> AddRangeAsync(List<T> entities);
        Task<int> Update(T entity);
        Task<int> UpdateRangeAsync(List<T> t);
        Task<int> DeleteAsync(T t);
        Task<List<T>> GetAllAsaync();
        Task<T> GetModelAsync(int id);
        Task<List<T>> GetAsync(Expression<Func<T, bool>> expre);


    }
}
